[codex] Add runtime abstraction and cc-connect provider#1103
Draft
ashione wants to merge 77 commits into
Draft
Conversation
added 12 commits
June 8, 2026 20:35
ashione
force-pushed
the
feature/runtime-abstraction-cc-connect
branch
from
June 9, 2026 12:12
75a8efd to
a504a8c
Compare
…action-cc-connect # Conflicts: # electron/services/providers-api.ts # package.json # pnpm-lock.yaml
Add operation-level runtime capabilities so cc-connect can report native, proxy, and unsupported sub-operations without overstating OpenClaw parity. Keep OpenClaw as the default runtime, surface cc-connect operation gaps in Settings, and extend OAuth/bundle E2E coverage plus harness specs for replacement-readiness validation.
Send GUI chat through the Codex bridge so cc-connect runtime sessions use Codex as the execution engine. Persist Codex JSONL tool call and tool output events as ClawX history messages so the chat execution graph can show command/tool relationships.
Default cc-connect Codex execution to ClawX-managed runtime workspaces under userData instead of the ClawX source checkout. Map OpenClaw agent ids to cc-connect managed workspace directories without inheriting OpenClaw workspace paths, while preserving explicit workDir overrides for diagnostics.
Require the real Feishu admin fixture before launch and classify exit-zero test commands with no passing tests as skipped. Record why the unreleased cc-connect usage observer does not yet satisfy the runtime token contract.
Keep GitHub and OSS publication tag-only while allowing unsigned workflow-dispatch builds to exercise all five packaged runtime smoke targets.
Pass archive paths directly to tar so Windows runner paths are not shell-escaped. Keep macOS signature verification mandatory by default while allowing explicit unsigned manual smoke evidence.
Keep OAuth acquisition runtime-neutral, synchronize the resulting account through the selected RuntimeProvider, and avoid restarting OpenClaw while cc-connect is active. Preserve the existing OpenClaw projection fallback and surface runtime projection failures to the OAuth flow.
Give newly acquired browser OAuth credentials one-time precedence when syncing cc-connect, while keeping ordinary runtime starts managed-first so Codex token rotation is preserved. Add Electron runtime recovery coverage and machine-readable verifier evidence.
Treat undeclared operations as unsupported after runtime status publishes its operation map, and stop cc-connect-only channel gaps before RPC. Add replacement-required unit and real-bundle verifier evidence.
Route real image, file, audio, and video packets from bundled cc-connect through managed history and GUI Chat. Preserve distinct same-run events, keep runtime media visible beside execution graphs, and add real CLI evidence plus verifier coverage.
Render initial text previews, route handle-only updates across concurrent agents, and clear transient text without discarding structured tool state.\n\nAdd real bundled cc-connect preview/update GUI evidence and keep unsupported upstream delete/button triggers explicit in the validation matrix.
Map public Bridge cards and select options into validated runtime interactions, then return responses through card_action without bypassing cc-connect. Add real bundled Electron evidence for the /lang choice loop and document the v1.4.1 persistence boundary.
Exercise real cc-connect exec and Codex OAuth prompt jobs on native scheduler ticks. Record sanitized UI and machine evidence, preserve runtime PID, and require successful deletion plus post-delete absence.
Mask managed workspace paths in real OAuth screenshots and replace repository, home, and temp roots before persisting local-real reports. Preserve approval, tool lifecycle, generated-file, and retry evidence.
Map the pinned runtime's last_run and last_error fields into the shared Cron contract instead of treating trigger acknowledgement as completion. Make the real OAuth Cron scenario wait for runtime completion before asserting public history and attach bounded diagnostics on failure.
Keep Run Now acknowledgement non-blocking while observing the runtime-owned job until its last run changes or a bounded cancellation condition occurs. Cover delayed success and failure in deterministic Electron tests and the real cc-connect OAuth GUI flow.
Launch Electron with isolated legacy and shared roots to verify startup migration, directory ownership, source retention, and canonical-state precedence across relaunches. Keep the existing flat E2E userData override as the default for all other tests.
Verify real cc-connect channel import keeps OpenClaw compatibility data read-only, stores secrets only in the encrypted vault, and emits sanitized ownership evidence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a runtime abstraction layer for ClawX so OpenClaw remains the default runtime while
cc-connectcan be selected as an optional packaged runtime.This update completes the cc-connect replacement slice:
cc-connectand native OpenAI Codex CLI artifacts into app resources; runtime startup no longer depends on global installs, PATH binaries,node_modulespostinstall binaries, or app-time downloads.app.getPath('userData')/runtimes/cc-connect/config.toml.chat:message/chat:runtime-eventHost events.Validation
pnpm run typecheck:nodepnpm run typecheck:webpnpm exec vitest run tests/unit/cc-connect-runtime-provider.test.ts tests/unit/cc-connect-paths.test.ts tests/unit/codex-paths.test.ts tests/unit/codex-bundle.test.ts tests/unit/cc-connect-skills.test.ts tests/unit/host-services.test.ts tests/unit/runtime-manager.test.ts tests/unit/codex-cli-bridge.test.tspnpm run bundle:cc-connect:current && pnpm run bundle:codex:currentpnpm run comms:replay && pnpm run comms:comparepnpm run build:vite && pnpm exec playwright test tests/e2e/cc-connect-codex-runtime.spec.ts tests/e2e/settings-runtime-selector.spec.tspnpm exec eslint electron/main/ipc-handlers.ts electron/runtime/cc-connect-bridge-adapter.ts electron/runtime/cc-connect-paths.ts electron/runtime/cc-connect-provider.ts electron/runtime/cc-connect-skills.ts electron/runtime/codex-paths.ts electron/runtime/codex-cli-bridge.ts electron/runtime/types.ts electron/services/cron-api.ts electron/services/skills-api.ts scripts/bundle-codex.mjs scripts/codex-bundle-lib.mjs tests/e2e/cc-connect-codex-runtime.spec.ts tests/unit/cc-connect-paths.test.ts tests/unit/cc-connect-runtime-provider.test.ts tests/unit/cc-connect-skills.test.ts tests/unit/codex-bundle.test.ts tests/unit/codex-paths.test.ts tests/unit/host-services.test.ts tests/fixtures/codex-bundle-api.tsgit diff --checkbuild/cc-connect/darwin-arm64/cc-connect --versionbuild/codex/darwin-arm64/bin/codex --versionNote: local full
pnpm run lint:checkstill fails only because this checkout contains nested.claude/worktrees/...directories with unrelated lint errors outside the PR diff. The scoped lint command above covers the files changed by this PR and passes.Remaining Notes